<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
 <form action="batchUpdateProduct" method="post">

 <center>
    
   <table border=1> 
    <tr>
	    <td>ID</td>
	    <td>name</td>
	    <td>price</td>
	    <td></td>
    </tr>
   <c:forEach items="${productList}" var="p"  varStatus="s">
   
    <tr>
     
	    <td><input type="checkbox" name="ids" value="${p.id}" ><input type="hidden" name="productList[${s.index}].id" value="${p.id}" > </td>
	    <td><input type="text" name="productList[${s.index}].name" value="${p.name}" ></td>
	    <td><input type="text" name="productList[${s.index}].price" value="${p.price}" ></td>
	    <td><a href="productEdit?id=${p.id}">修改</a></td>
    </tr>
   </c:forEach>
   <tr>
   <td colspan=4> <input type="submit"  value="批量删除"  />  <input type="submit"  value="批量修改"  />  </td>
   
   </tr>
   </form>
   </table>
   
  </center> 
</body>
</html>